<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" id="txt1" value="10">
    <select name="" id="fuhao">
        <option value="请选择符号" selected="selected">请选择符号</option>
        <option value="+">+</option>
        <option value="-">-</option>
        <option value="*">*</option>
        <option value="/">/</option>
    </select>
    <input type="text" id="txt2" value="10">
    <input type="button" value="=" id="btn">
    <input type="text" id="txt3">

    <script src="./lib/jquery.js"></script>
    <script src="./lib/fools.js"></script>
    <script>
        function getVale(a) {
            if (/^(\d+.?\d*)$/i.test(a.val())) {
                return parseFloat(Fools.getDateVal(a))
            } else {
                return false
            }
        }
        $("#btn").click(function () {
            const b = getVale($('#txt1'))
            const c = getVale($('#txt2'))
            if (b) {
                if (c) {
                    $("#txt3").val(Fools.fuhao($("option:selected").val(), b, c))
                } else {
                    alert("第二个数字未填写")
                }
            } else {
                alert("第一个数字未填写")
            }


        })
    </script>
</body>

</html>